package cn.swu.ghx.swu.library.data.teacher

import android.telecom.Call
import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.Query

@Dao
interface TeacherDao {

    @Insert
    fun save(item:Teacher)

    @Query("delete from Teacher where id = :id")
    fun remove(id:Int):Int

    @Delete
    fun remove(item:Teacher):Int

    @Query("select * from Teacher where name like '%' || :name || '%' ")
    fun queryByName(name:String):List<Teacher>

    @Query("select * from Teacher")
    fun all():List<Teacher>
}